﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace robotGUI
{
    public partial class frmDialogBox : Form
    {
        public frmDialogBox(string header, string text)
        {
            InitializeComponent();
            Graphics g = this.CreateGraphics();
            SizeF s = g.MeasureString(text, lblText.Font);
            g.Dispose();
            if (s.Width > 150) Width += (int)s.Width - 150;
            if (s.Height > 60) Width += (int)s.Width - 60;
            this.Text = header;
            lblText.Text = text;
        }
    }
}
